<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
	include("_include.user.judge.php");
	$kboy_userid = $_SESSION['kboy_userid'];
	$kboy_user = $_SESSION['kboy_user'];
	
	$action = chkstr(trim($_REQUEST['action']));
	$id = chkstr(trim($_REQUEST['id']));
   if($action == 'del'){//删除消息
	    if(!is_numeric($id)){
		  echo erro("参数错误！");
		}
		if(getNewsNums("kboy_webad","uid=$kboy_userid and id=$id") <1){
		  echo erro("参数错误");
	    }
		$mysql = new sqlstr("kboy_webad"); 
		$news_sql = $mysql -> deleteSql("id=$id");
		$news_res = mysql_query($news_sql);
		if($news_res){
			echo ok("操作成功","user_xiaoxi.php");
		}else{
			echo erro("服务器内部错误");
		}
	}
	else{
		echo erro("参数错误");
	}
?>